Imports System
Imports System.Windows.Forms
 Public Class AbstractDto
 Implements IComparable
 Public SSN As String
 Public Enum Class_KieuDL
 Access = 0 
 sql = 1
 SqlCe = 2
 Xml = 3
 Oracle = 4
 sqlExpress = 5
 MySql=6
 End Enum
 Public BatLoi as Boolean = False 
 Public Sub New()
 End Sub
 Public Function CompareTo(ByVal obj As Object) As Integer _
 Implements System.IComparable.CompareTo 
 If Not TypeOf obj Is AbstractDto Then 
 Throw New Exception("Object is not MyObject") 
 End If
 Dim Compare As AbstractDto = CType(obj, AbstractDto) 
 Dim result As Integer = Me.SSN.CompareTo(Compare.SSN) 
 If result = 0 Then
 result = Me.SSN.CompareTo(Compare.SSN)
 End If
 Return result
 End Function 
 End Class
